import { axios } from '@/utils/request'

/**
 * 查询时空数据
 *
 * @author cy
 * @date 2022-07-28 19:37:28
 */
export function timeSpaceDataRecordPage (parameter) {
  return axios({
    url: '/timeSpaceDataRecord/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 时空数据列表
 *
 * @author cy
 * @date 2022-07-28 19:37:28
 */
export function timeSpaceDataRecordList (parameter) {
  return axios({
    url: '/timeSpaceDataRecord/list',
    method: 'get',
    params: parameter
  })
}

/**
 * 添加时空数据
 *
 * @author cy
 * @date 2022-07-28 19:37:28
 */
export function timeSpaceDataRecordAdd (parameter) {
  return axios({
    url: '/timeSpaceDataRecord/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑时空数据
 *
 * @author cy
 * @date 2022-07-28 19:37:28
 */
export function timeSpaceDataRecordEdit (parameter) {
  return axios({
    url: '/timeSpaceDataRecord/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除时空数据
 *
 * @author cy
 * @date 2022-07-28 19:37:28
 */
export function timeSpaceDataRecordDelete (parameter) {
  return axios({
    url: '/timeSpaceDataRecord/delete',
    method: 'post',
    data: parameter
  })
}

export function timeSpaceDataRecordDeleteOne (id) {
  return axios({
    url: '/timeSpaceDataRecord/deleteOne/' + id,
    method: 'post'
  })
}

/**
 * 导出时空数据
 *
 * @author cy
 * @date 2022-07-28 19:37:28
 */
export function timeSpaceDataRecordExport (parameter) {
  return axios({
    url: '/timeSpaceDataRecord/export',
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}

export function parseFile(record) {
  return axios({
    url: '/timeSpaceDataRecord/parse',
    method: 'post',
    data: record
  })
}

export function parseIndexFile(record) {
  return axios({
    url: '/timeSpaceDataRecord/Indexparse',
    method: 'post',
    data: record
  })
}

export function timeSpaceDataRecordDetail(parameter) {
  return axios({
    url: '/timeSpaceDataRecord/detail',
    method: 'get',
    params: parameter
  })
}

export function metadataPage (parameter) {
  return axios({
    url: '/timeSpaceDataRecord/metadata/page',
    method: 'get',
    params: parameter
  })
}

export function defineData(body) {
  return axios({
    url: '/timeSpaceDataRecord/define',
    method: 'post',
    data: body
  })
}

export function defineIndexData(body) {
  return axios({
    url: '/timeSpaceDataRecord/Indexdefine',
    method: 'post',
    data: body
  })
}
